home *** CD-ROM | disk | FTP | other *** search
/ 5 Star Games: DOS Edition 2 / 5 Star Games - DOS Edition (1995)(Ready to Run).iso / dbc / db_uwin.c < prev    next >
C/C++ Source or Header  |  1992-02-28  |  25KB  |  422 lines

  1. /****************************************************************************/
  2. /*                        DATABOSS MODULE: DB_UWIN.C                        */
  3. /****************************************************************************/
  4.  
  5. #include "db_lsc.h"
  6.  
  7. #ifdef __TURBOC__
  8.     #include <conio.h>
  9.     #include "db_types.h"
  10. #else
  11.     #include <graph.h>
  12.     #include "db_types.h"
  13.     #include "db_conio.h"
  14. #endif
  15. #include <dos.h>
  16. #include <io.h>
  17. #include <math.h>
  18. #include <stdio.h>
  19. #include <stdlib.h>
  20. #include <string.h>
  21. #include "db_curs.h"
  22. #include "db_dos.h"
  23. #include "db_file.h"
  24. #include "db_key.h"
  25. #include "db_str.h"
  26. #include "db_funcs.h"
  27. #include "db_sets.h"
  28. #include "db_win.h"
  29. #include "db_uwin.h"
  30.  
  31. /***************************  INTERNAL VARIABLES  ***************************/
  32.  
  33. justified just;
  34.  
  35. static bool initialized = False;
  36.  
  37. /*****************************  IMPLEMENTATION  *****************************/
  38.  
  39. winptr ColorPaletteWin(void)
  40. /* Draw the Color Palette Window */
  41. {
  42.   winptr twinp;
  43.  
  44.   twinp = NULL;
  45.   if (openwin(0,17,7,48,8,31,30,8,"─┐│┘─└│┌",TopLft,"┤ Color Palette ├")) {
  46.     twinp = curwin;
  47.     writewxy("                  Low     High       Dec =      ",0,1,1,twinp);
  48.     writewxy("               ┌────────────────┐               ",0,1,2,twinp);
  49.     writewxy(" Foreground --> ████████████████  ┌┬┬┬┬┬┬┬┬┬┬┬┐ ",0,1,3,twinp);
  50.     writewxy("                                  │├┼┼┼┼┼┼┼┼┼┤│ ",0,1,4,twinp);
  51.     writewxy("                                  │├┼┼┼┼┼┼┼┼┼┤│ ",0,1,5,twinp);
  52.     writewxy(" Background -->         ■■■■■■■■  └┴┴┴┴┴┴┴┴┴┴┴┘ ",0,1,6,twinp);
  53.     writewxy("               └────────────────┘               ",0,1,7,twinp);
  54.     writewxy("                  Normal  Blink      Hex =      ",0,1,8,twinp);
  55.     attrwritewxy(1,16,17,3,twinp);  attrwritewxy(1,1,18,3,twinp);
  56.     attrwritewxy(1,2,19,3,twinp);  attrwritewxy(1,3,20,3,twinp);
  57.     attrwritewxy(1,4,21,3,twinp);  attrwritewxy(1,5,22,3,twinp);
  58.     attrwritewxy(1,6,23,3,twinp);  attrwritewxy(1,7,24,3,twinp);
  59.     attrwritewxy(1,8,25,3,twinp);  attrwritewxy(1,9,26,3,twinp);
  60.     attrwritewxy(1,10,27,3,twinp);  attrwritewxy(1,11,28,3,twinp);
  61.     attrwritewxy(1,12,29,3,twinp);  attrwritewxy(1,13,30,3,twinp);
  62.     attrwritewxy(1,14,31,3,twinp);  attrwritewxy(1,15,32,3,twinp);
  63.     attrwritewxy(1,15,17,6,twinp);  attrwritewxy(1,47,19,6,twinp);
  64.     attrwritewxy(1,63,20,6,twinp);  attrwritewxy(1,79,21,6,twinp);
  65.     attrwritewxy(1,95,22,6,twinp);  attrwritewxy(1,111,23,6,twinp);
  66.     attrwritewxy(1,127,24,6,twinp);  attrwritewxy(1,143,25,6,twinp);
  67.     attrwritewxy(1,159,26,6,twinp);  attrwritewxy(1,175,27,6,twinp);
  68.     attrwritewxy(1,191,28,6,twinp);  attrwritewxy(1,207,29,6,twinp);
  69.     attrwritewxy(1,223,30,6,twinp);  attrwritewxy(1,239,31,6,twinp);
  70.     attrwritewxy(1,255,32,6,twinp);
  71.   }
  72.   return(twinp);
  73. }
  74.  
  75. winptr ColorPaletteHelp(void)
  76. /* Draw the Color Palette Help Window */
  77. {
  78.   winptr twinp;
  79.  
  80.   twinp = NULL;
  81.   if (openwin(0,12,16,58,6,47,46,8,"─┐│┘─└│┌",TopLft,"┤ Color Palette ├")) {
  82.     twinp = curwin;
  83.     writewxy(" Use the cursor  Up,  and Down keys to toggle between the ",0,1,1,twinp);
  84.     writewxy(" Foregroung, and Background attribute bars;  then use the ",0,1,2,twinp);
  85.     writewxy(" Cursor Left,  and Right keys to select the desired color ",0,1,3,twinp);
  86.     writewxy(" combination.                                             ",0,1,4,twinp);
  87.     writewxy(" When you have the selected the desired combination press ",0,1,5,twinp);
  88.     writewxy(" <Enter>.  Press <Esc> to abort.                          ",0,1,6,twinp);
  89.   }
  90.   return(twinp);
  91. }
  92.  
  93. winptr PickChHelp(void)
  94. /* Draw the Pick Ascii Character Window */
  95. {
  96.   winptr twinp;
  97.  
  98.   twinp = NULL;
  99.   if (openwin(0,12,17,57,4,47,46,8,"─┐│┘─└│┌",TopLft,"┤ Pick Character ├")) {
  100.     twinp = curwin;
  101.     writewxy(" Use the cursor arrow keys to move the cursor block over ",0,1,1,twinp);
  102.     writewxy(" the character you desire,  then press the  <Enter> key. ",0,1,2,twinp);
  103.     writewxy(" You may also  select  any  character from the  standard ",0,1,3,twinp);
  104.     writewxy(" keyboard by pressing that key.  Press  <Esc> to  Abort. ",0,1,4,twinp);
  105.   }
  106.   return(twinp);
  107. }
  108.  
  109. winptr DirPickHelp(void)
  110. /* Draw the Pick FileName Help Window */
  111. {
  112.   winptr twinp;
  113.  
  114.   twinp = NULL;
  115.   if (openwin(0,6,14,71,9,47,46,8,"─┐│┘─└│┌",TopLft,"┤ Directory of Files ├")) {
  116.     twinp = curwin;
  117.     writewxy(" Use the cursor \x18\x19\x1A\x1B keys to move the highlight bar over the name ",0,1,1,twinp);
  118.     writewxy(" of the file you desire,  then press <Enter>.   The PgDn and PgUp keys ",0,1,2,twinp);
  119.     writewxy(" will go to other pages, (if they exist).                              ",0,1,3,twinp);
  120.     writewxy("                                                                       ",0,1,4,twinp);
  121.     writewxy(" If you  select  a  'Directory', (indicated by the trailing '\\')  then ",0,1,5,twinp);
  122.     writewxy(" the files from that directory  will  be  displayed.   To select files ",0,1,6,twinp);
  123.     writewxy(" from another DRIVE simultaneously  press 'Ctrl' + <Drive Letter>.     ",0,1,7,twinp);
  124.     writewxy("                                                                       ",0,1,8,twinp);
  125.     writewxy("         Press Esc to remove this help window from the screen.         ",0,1,9,twinp);
  126.   }
  127.   return(twinp);
  128. }
  129.  
  130. winptr BoxChHelp(void)
  131. /* Draw the Select Box Character Help Window */
  132. {
  133.   winptr twinp;
  134.  
  135.   twinp = NULL;
  136.   if (openwin(0,9,18,66,2,47,46,8,"─┐│┘─└│┌",TopLft,"┤ Box Characters ├")) {
  137.     twinp = curwin;
  138.     writewxy(" Use the cursor left,  and right  arrow keys to highlight the box ",0,1,1,twinp);
  139.     writewxy(" character you desire, then press <Enter>.  Press <Esc> to abort. ",0,1,2,twinp);
  140.   }
  141.   return(twinp);
  142. }
  143.  
  144. winptr OnLineManualHelp(void)
  145. /* Draw the On-Line Manual Help Window */
  146. {
  147.   winptr twinp;
  148.  
  149.   twinp = NULL;
  150.   if (openwin(0,4,9,73,11,47,46,8,"─┐│┘─└│┌",TopLft,"┤ Manual Commands ├")) {
  151.     twinp = curwin;
  152.     writewxy(" \x18\x19 ..................... Scroll Up and Down.                           ",0,1,1,twinp);
  153.     writewxy(" Home, End ............... Go to the Top and Bottom of the current page. ",0,1,2,twinp);
  154.     writewxy(" PgDn, PgUp .............. Go to the Next and Previous Page.             ",0,1,3,twinp);
  155.     writewxy(" Ctrl PgDn, Ctrl PgUp .... Go to the Next and Previous Chapter.          ",0,1,4,twinp);
  156.     writewxy(" Ctrl Home, Ctrl End ..... Go to the First and Last Chapter.             ",0,1,5,twinp);
  157.     writewxy(" P(n) .................... Enter the Page No. to Jump to.                ",0,1,6,twinp);
  158.     writewxy(" C(n) .................... Enter the Chapter No. to Jump to.             ",0,1,7,twinp);
  159.     writewxy(" F8 ...................... Go to the Overview to select a page.          ",0,1,8,twinp);
  160.     writewxy(" F9 ...................... Go to the Index to select a page.             ",0,1,9,twinp);
  161.     writewxy(" Ctrl P .................. Print Manual.  Print Pages, Chapters, etc.    ",0,1,10,twinp);
  162.     writewxy(" ESC ..................... Leave the Online Manual.                      ",0,1,11,twinp);
  163.   }
  164.   return(twinp);
  165. }
  166.  
  167. winptr FixFilesWin(void)
  168. /* Draw the Re-Index Module"s Main Window */
  169. {
  170.   winptr twinp;
  171.  
  172.   twinp = NULL;
  173.   if (openwin(0,2,2,78,23,63,62,8,"─┐│┘─└│┌",TopLft,"─ File Recovery ─")) {
  174.     twinp = curwin;
  175.     writewxy("   This module will enable you to purge all deleted records, and/or rebuild   ",0,1,1,twinp);
  176.     writewxy("   any  damaged  index  files.   You  may  restrict the recovery process to   ",0,1,2,twinp);
  177.     writewxy("   specific files if desired.                                                 ",0,1,3,twinp);
  178.     writewxy("                                                                              ",0,1,4,twinp);
  179.     writewxy("    NOTE :- Be sure to have at least  one  backup of your data BEFORE you     ",0,1,5,twinp);
  180.     writewxy("            continue with this process.  You may have to restore the data     ",0,1,6,twinp);
  181.     writewxy("            files  if  this process fails.  If you do not have any recent     ",0,1,7,twinp);
  182.     writewxy("            backups of your data files, press ESC and make some now.          ",0,1,8,twinp);
  183.     writewxy("                                                                              ",0,1,9,twinp);
  184.     writewxy("                                                                              ",0,1,10,twinp);
  185.     writewxy("   Selected Files    ┌────────────┬────────────┬────────────┬────────────┐    ",0,1,11,twinp);
  186.     writewxy("                     │            │            │            │            │    ",0,1,12,twinp);
  187.     writewxy(" Use \x18\x19\x1A\x1B to move    ├────────────┼────────────┼────────────┼────────────┤    ",0,1,13,twinp);
  188.     writewxy(" between Files.      │            │            │            │            │    ",0,1,14,twinp);
  189.     writewxy(" Press S to Select & ├────────────┼────────────┼────────────┼────────────┤    ",0,1,15,twinp);
  190.     writewxy(" Unselect Files.     │            │            │            │            │    ",0,1,16,twinp);
  191.     writewxy("                     ├────────────┼────────────┼────────────┼────────────┤    ",0,1,17,twinp);
  192.     writewxy(" Selected/UnSelected │            │            │            │            │    ",0,1,18,twinp);
  193.     writewxy("                     └────────────┴────────────┴────────────┴────────────┘    ",0,1,19,twinp);
  194.     writewxy("                                                                              ",0,1,20,twinp);
  195.     writewxy("        Press 'Y' or 'N' to select:--  Purge Deleted Records (Y/N)            ",0,1,21,twinp);
  196.     writewxy("                                                                              ",0,1,22,twinp);
  197.     writewxy("                    Press Esc to Abort or F10 to Continue.                    ",0,1,23,twinp);
  198.     attrwritewxy(69,75,5,5,twinp);  attrwritewxy(69,75,5,6,twinp);
  199.     attrwritewxy(69,75,5,7,twinp);  attrwritewxy(69,75,5,8,twinp);
  200.     attrwritewxy(53,31,22,11,twinp);  attrwritewxy(53,31,22,12,twinp);
  201.     attrwritewxy(53,31,22,13,twinp);  attrwritewxy(53,31,22,14,twinp);
  202.     attrwritewxy(53,31,22,15,twinp);  attrwritewxy(53,31,22,16,twinp);
  203.     attrwritewxy(53,31,22,17,twinp);  attrwritewxy(8,112,2,18,twinp);
  204.     attrwritewxy(10,31,11,18,twinp);  attrwritewxy(53,31,22,18,twinp);
  205.     attrwritewxy(53,31,22,19,twinp);  attrwritewxy(3,75,27,23,twinp);
  206.     attrwritewxy(3,75,43,23,twinp);
  207.   }
  208.   return(twinp);
  209. }
  210.  
  211. winptr PrintMenuHelp(void)
  212. /* Draw the Print Menu Module"s Help Window */
  213. {
  214.   winptr twinp;
  215.  
  216.   twinp = NULL;
  217.   if (openwin(0,9,3,64,20,47,46,8,"─┐│┘─└│┌",TopLft,"┤ Print Menu Definition ├")) {
  218.     twinp = curwin;
  219.     writewxy(" You may print the menu definition either to the Printer or to  ",0,1,1,twinp);
  220.     writewxy(" a Disk File,  if the latter,  then you will be prompted for a  ",0,1,2,twinp);
  221.     writewxy(" file name in which the output will be stored.                  ",0,1,3,twinp);
  222.     writewxy("                                                                ",0,1,4,twinp);
  223.     writewxy(" Next select how to handle extended ASCII characters, primarily ",0,1,5,twinp);
  224.     writewxy(" the extended 'line' characters.   There are three options that ",0,1,6,twinp);
  225.     writewxy(" allow you to select a better  output  format  if  your printer ",0,1,7,twinp);
  226.     writewxy(" supports the extended ASCII characters.  The choices are :--   ",0,1,8,twinp);
  227.     writewxy("                                                                ",0,1,9,twinp);
  228.     writewxy(" 1. Simple ASCII - Characters  with  ordinal  values from 32 to ",0,1,10,twinp);
  229.     writewxy("    127  are  printed  as  normal,  the  single and double line ",0,1,11,twinp);
  230.     writewxy("    characters are translated to |-+\x22=, all the rest are turned ",0,1,12,twinp);
  231.     writewxy("    into spaces.                                                ",0,1,13,twinp);
  232.     writewxy("                                                                ",0,1,14,twinp);
  233.     writewxy(" 2. Extended ASCII - Characters with ordinal values  from 32 to ",0,1,15,twinp);
  234.     writewxy("    255  are  printed  as they appear,  characters with ordinal ",0,1,16,twinp);
  235.     writewxy("    values from 0  to  31 inclusive,  (the control characters), ",0,1,17,twinp);
  236.     writewxy("    are turned into spaces.                                     ",0,1,18,twinp);
  237.     writewxy("                                                                ",0,1,19,twinp);
  238.     writewxy(" 3. Complete ASCII - All characters are output as they appear.  ",0,1,20,twinp);
  239.   }
  240.   return(twinp);
  241. }
  242.  
  243. winptr MakerHelp(void)
  244. /* Draw Menu Maker"s Main Help Window */
  245. {
  246.   winptr twinp;
  247.  
  248.   twinp = NULL;
  249.   if (openwin(0,3,7,75,14,47,46,8,"─┐│┘─└│┌",TopLft,"┤ MenuMaker Options ├")) {
  250.     twinp = curwin;
  251.     writewxy(" You can do a number of things:-                                           ",0,1,1,twinp);
  252.     writewxy(" Press F1 again to look at the on line manual OR                           ",0,1,2,twinp);
  253.     writewxy(" Press Esc(ape) to remove this help box AND                                ",0,1,3,twinp);
  254.     writewxy(" -   Press F2  If you want to add a name to the menu e.g.  You might want  ",0,1,4,twinp);
  255.     writewxy("               to add a game to this menu OR                               ",0,1,5,twinp);
  256.     writewxy("               if you want to add a subsidiary menu e.g.  You might want   ",0,1,6,twinp);
  257.     writewxy("               to put all your games on to a 'Games Menu'.                 ",0,1,7,twinp);
  258.     writewxy(" -   Press F3  If you want to delete a name from the menu OR               ",0,1,8,twinp);
  259.     writewxy("               If you want to delete the menu (this is only allowed if     ",0,1,9,twinp);
  260.     writewxy("               there are no names left in the menu).                       ",0,1,10,twinp);
  261.     writewxy(" -   Press F4  If you want to change a name.                               ",0,1,11,twinp);
  262.     writewxy(" -   Press F5  If you want to change the title on the screen.              ",0,1,12,twinp);
  263.     writewxy(" -   Press Esc If you want to go back a level of menu or if you are        ",0,1,13,twinp);
  264.     writewxy("               finished making changes to your menu.                       ",0,1,14,twinp);
  265.   }
  266.   return(twinp);
  267. }
  268.  
  269. winptr MakerAddHelp(void)
  270. /* Draw Menu Maker"s "Add Item" Help Window */
  271. {
  272.   winptr twinp;
  273.  
  274.   twinp = NULL;
  275.   if (openwin(0,2,3,78,19,47,46,8,"─┐│┘─└│┌",TopLft,"┤ Adding to a Menu ├")) {
  276.     twinp = curwin;
  277.     writewxy(" You are adding something to the menu.  Tell the computer whether:-           ",0,1,1,twinp);
  278.     writewxy(" -  You want to add a (program) name to this menu (Perhaps you want to run    ",0,1,2,twinp);
  279.     writewxy("    a game from this menu and have its name appear in this menu)  OR          ",0,1,3,twinp);
  280.     writewxy(" -  You want to add a subsidiary menu (Perhaps you want to put all your       ",0,1,4,twinp);
  281.     writewxy("    games on the one menu and have the menu name 'Games Menu' appear in       ",0,1,5,twinp);
  282.     writewxy("    this menu).                                                               ",0,1,6,twinp);
  283.     writewxy("                                                                              ",0,1,7,twinp);
  284.     writewxy(" If you want to add a (program) name to this menu:-                           ",0,1,8,twinp);
  285.     writewxy(" -  Press Esc to remove this help box from the screen AND press N (for Name). ",0,1,9,twinp);
  286.     writewxy("                                                                              ",0,1,10,twinp);
  287.     writewxy(" If you want to add a subsidiary menu:--                                      ",0,1,11,twinp);
  288.     writewxy(" -  Press Esc to remove this help box AND press S (for Subsidiary Menu).      ",0,1,12,twinp);
  289.     writewxy("                                                                              ",0,1,13,twinp);
  290.     writewxy(" If you select 'N' for Name then you will get to point at the name you want.  ",0,1,14,twinp);
  291.     writewxy(" After this MenuMaker will prompt you 'Enter Any Parameters Now : '.  If the  ",0,1,15,twinp);
  292.     writewxy(" program you have chosen needs parameters you may enter them here, or you can ",0,1,16,twinp);
  293.     writewxy(" leave this section blank by pressing <Enter> straight away.                  ",0,1,17,twinp);
  294.     writewxy("                                                                              ",0,1,18,twinp);
  295.     writewxy("  If you are still unsure and you want the on-line manual - Press F1 again.   ",0,1,19,twinp);
  296.   }
  297.   return(twinp);
  298. }
  299.  
  300. winptr MakerNameHelp(void)
  301. /* Draw Menu Maker"s "Name Item" Help Window */
  302. {
  303.   winptr twinp;
  304.  
  305.   twinp = NULL;
  306.   if (openwin(0,2,3,78,21,47,46,8,"─┐│┘─└│┌",TopLft,"┤ Typing the name ├")) {
  307.     twinp = curwin;
  308.     writewxy(" You are being asked to type a name for the program or sub-menu.  If you are  ",0,1,1,twinp);
  309.     writewxy(" typing the name of a sub-menu, what you type will appear in this menu and    ",0,1,2,twinp);
  310.     writewxy(" also as a title on the sub-menu as well.                                     ",0,1,3,twinp);
  311.     writewxy(" When you are typing the name, if you:-                                       ",0,1,4,twinp);
  312.     writewxy(" Press the Del(ete) key  You will delete the character which has the cursor   ",0,1,5,twinp);
  313.     writewxy("                         on it.                                               ",0,1,6,twinp);
  314.     writewxy(" Press the Ins(ert) key  You will turn 'Insert Mode' on.  When 'Insert Mode'  ",0,1,7,twinp);
  315.     writewxy("                         is on, the cursor turns into a flashing rectangle    ",0,1,8,twinp);
  316.     writewxy("                         and you can add characters into the name.  To turn   ",0,1,9,twinp);
  317.     writewxy("                         'Insert Mode' off, press the Ins(ert) key again.     ",0,1,10,twinp);
  318.     writewxy(" Press the Home key      The cursor will go to the start of the name.         ",0,1,11,twinp);
  319.     writewxy(" Press the End key       The cursor will go to the end of the name.           ",0,1,12,twinp);
  320.     writewxy(" Press the Left arrow    The cursor will go one character to the left.        ",0,1,13,twinp);
  321.     writewxy(" Press the Right arrow   The cursor will go one character to the right.       ",0,1,14,twinp);
  322.     writewxy(" Press the (Esc)ape key  The (program)name/(Sub-menu)name will not be added.  ",0,1,15,twinp);
  323.     writewxy(" Press the Enter Key     The name, as it appears, will be accepted.           ",0,1,16,twinp);
  324.     writewxy("                                                                              ",0,1,17,twinp);
  325.     writewxy(" If you are still unsure, read your manual AND/OR Press F1 to see the on-line ",0,1,18,twinp);
  326.     writewxy(" manual.                                                                      ",0,1,19,twinp);
  327.     writewxy("                                                                              ",0,1,20,twinp);
  328.     writewxy("       Press the Esc(ape) key to remove this help box from the screen.        ",0,1,21,twinp);
  329.   }
  330.   return(twinp);
  331. }
  332.  
  333. winptr MakerDelHelp(void)
  334. /* Draw Menu Maker"s "Delete Item" Help Window */
  335. {
  336.   winptr twinp;
  337.  
  338.   twinp = NULL;
  339.   if (openwin(0,3,4,76,18,47,46,8,"─┐│┘─└│┌",TopLft,"┤ Deleting from the menu ├")) {
  340.     twinp = curwin;
  341.     writewxy(" Warning - If you continue you will erase something.                        ",0,1,1,twinp);
  342.     writewxy("                                                                            ",0,1,2,twinp);
  343.     writewxy(" If there is a name in the menu which has the highlight bar on it, and you  ",0,1,3,twinp);
  344.     writewxy(" continue, you will erase that name and you will not be able to run that    ",0,1,4,twinp);
  345.     writewxy(" program.                                                                   ",0,1,5,twinp);
  346.     writewxy("                                                                            ",0,1,6,twinp);
  347.     writewxy(" If there are no names in the menu, and you continue, you will erase the    ",0,1,7,twinp);
  348.     writewxy(" menu and erase its name from the previous menu.                            ",0,1,8,twinp);
  349.     writewxy("                                                                            ",0,1,9,twinp);
  350.     writewxy(" If you do not want to erase the name or the menu, Press Esc(ape) to remove ",0,1,10,twinp);
  351.     writewxy(" this help box from the screen and Press N for No.                          ",0,1,11,twinp);
  352.     writewxy("                                                                            ",0,1,12,twinp);
  353.     writewxy(" If you want to erase the name or the menu, Press Esc(ape) to remove this   ",0,1,13,twinp);
  354.     writewxy(" help box from the screen and Press Y for Yes.                              ",0,1,14,twinp);
  355.     writewxy("                                                                            ",0,1,15,twinp);
  356.     writewxy(" If you are still unsure, read your manual AND/OR Press F1 to look at the   ",0,1,16,twinp);
  357.     writewxy(" on-line manual.                                                            ",0,1,17,twinp);
  358.     writewxy("                                                                            ",0,1,18,twinp);
  359.   }
  360.   return(twinp);
  361. }
  362.  
  363. winptr MakerTitleHelp(void)
  364. /* Draw Menu Maker"s "Menu Title" Help Window */
  365. {
  366.   winptr twinp;
  367.  
  368.   twinp = NULL;
  369.   if (openwin(0,2,3,78,20,47,46,8,"─┐│┘─└│┌",TopLft,"┤ Changing the title ├")) {
  370.     twinp = curwin;
  371.     writewxy(" You have chosen to alter the title shown at the top of the screen.           ",0,1,1,twinp);
  372.     writewxy("                                                                              ",0,1,2,twinp);
  373.     writewxy(" When you are typing the title, If you:-                                      ",0,1,3,twinp);
  374.     writewxy(" Press the Del(ete) key  You will delete the character which has the cursor   ",0,1,4,twinp);
  375.     writewxy("                         on it.                                               ",0,1,5,twinp);
  376.     writewxy(" Press the Ins(ert) key  You will turn 'Insert Mode' on.  When 'Insert Mode'  ",0,1,6,twinp);
  377.     writewxy("                         is on, the cursor turns into a flashing rectangle    ",0,1,7,twinp);
  378.     writewxy("                         and you can add characters into the title.  To turn  ",0,1,8,twinp);
  379.     writewxy("                         'Insert Mode' off, press the Ins(ert) key again.     ",0,1,9,twinp);
  380.     writewxy(" Press the Home key      The cursor will go to the start of the title.        ",0,1,10,twinp);
  381.     writewxy(" Press the End key       The cursor will go to the end of the title.          ",0,1,11,twinp);
  382.     writewxy(" Press the Left arrow    The cursor will go one character to the left.        ",0,1,12,twinp);
  383.     writewxy(" Press the Right arrow   The cursor will go one character to the right.       ",0,1,13,twinp);
  384.     writewxy(" Press the (Esc)ape key  The Title will not be altered.                       ",0,1,14,twinp);
  385.     writewxy(" Press the Enter Key     The Title, as it appears, will be accepted.          ",0,1,15,twinp);
  386.     writewxy("                                                                              ",0,1,16,twinp);
  387.     writewxy(" If you are still unsure, read your manual AND/OR Press F1 to see the on-line ",0,1,17,twinp);
  388.     writewxy(" manual.                                                                      ",0,1,18,twinp);
  389.     writewxy("                                                                              ",0,1,19,twinp);
  390.     writewxy("       Press the Esc(ape) key to remove this help box from the screen.        ",0,1,20,twinp);
  391.   }
  392.   return(twinp);
  393. }
  394.  
  395. winptr ChooseHelpWin(void)
  396. {
  397.   winptr twinp;
  398.  
  399.   twinp = NULL;
  400.   if (openwin(0,20,10,40,6,47,46,8,"─┐│┘─└│┌",TopCnt,"─ Choose Help ─")) {
  401.     twinp = curwin;
  402.     writewxy(" Select  one of the  choices  listed in ",0,1,1,twinp);
  403.     writewxy(" the choose box,  by either  moving the ",0,1,2,twinp);
  404.     writewxy(" highlight bar over the required choice ",0,1,3,twinp);
  405.     writewxy(" and  pressing enter,  or  pressing the ",0,1,4,twinp);
  406.     writewxy(" character  that  corresponds  to  the  ",0,1,5,twinp);
  407.     writewxy(" first letter of the required choice.   ",0,1,6,twinp);
  408.   }
  409.   return(twinp);
  410. }
  411.  
  412.  
  413. /**********************  UNIT INITIALIZATION/EXIT CODE  *********************/
  414.  
  415. void db_uwin_init(void)
  416. {
  417.     if (!initialized) {
  418.         initialized = True;
  419.         db_key_init();
  420.     }
  421. }
  422.